Skip to content

fix(cudf): Skip input conversion for GPU source nodes - #58

Merged
sperlingxx merged 1 commit into
devfrom
codex/fix-velox-first-gpu-boundary
Aug 13, 2026
Merged

fix(cudf): Skip input conversion for GPU source nodes#58
sperlingxx merged 1 commit into
devfrom
codex/fix-velox-first-gpu-boundary

Conversation

@sperlingxx

@sperlingxx sperlingxx commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Avoid inserting CudfFromVelox before a GPU source operator whose plan node
has no input edge. Add focused selection tests for both sides of the boundary:

  • a CPU source feeding a GPU consumer still gets an input conversion; and
  • a GPU source leaf does not get a conversion for a nonexistent input.

Fixes #59.

Root cause

Commit 07e146e88b made the first operator in a fragment count as a non-GPU
predecessor. That is required when an MPP/UCX fragment receives an external
Velox RowVector, but it also matched GPU source leaves. The compiler then
asked gpuInputBoundaryType() to classify a source that did not exist and
raised:

[RUNTIME/INVALID_STATE] (0 vs. 0) GPU input boundary requires a source

This change additionally requires an input plan edge before inserting the
boundary. A first operator with a real input edge keeps the behavior introduced
by 07e146e88b.

Upstream and overlap check

The failing integration build used dev commit 0af87d87e6. Current dev
commit de935de174 has the same ToCudf.cpp bytes, including the faulty
first-operator condition, so the issue remains on current dev.

PR #39 is the only open PR found with this guard, but it is a large,
conflicting TopN/Grace/UCX change. No focused open ToCudf PR or issue was
found. Issue #27 is a general CI-coverage roadmap and does not implement this
fix.

This PR extracts the guard from #39 and adds dedicated boundary tests so it can
be reviewed and landed independently. If either PR lands first, the duplicate
hunk should be removed from the other during rebase. The original author is
credited in the commit trailer.

Validation

Paired Spark qualification used Gluten 0c5a3dd271 and this Velox commit
0ac015ae15, producing runtime image
sha256:a1793e9702106fa425fb5832d2cd74c9f6565754db24565a302131f048c24de3.

  • Focused native boundary regressions: 2/2 passed.
  • Full velox_cudf_tocudf_selection_test: 24/25 passed. The one failure,
    complexGroupingKeyExpressionsFallsBack, is an independently reproduced
    current-dev aggregation-selection failure; this boundary guard is not on
    that plan's changed path.
  • All FluxStrategyPlanSuite cases: 22/22 passed.
  • ExistingRDD -> Parquet -> readback reproducer: passed.
  • Complete L3 TPC-H SF1 golden comparison: Q1-Q22 all passed row and plan
    checks; 22 passed, 0 failed, 0 errors.
  • Full native ucx_exchange_test: 204 registered, 78 run, 126 expected skips,
    0 failures.
  • Forced multi-fragment MPP/UCX TPC-H Q3: passed full-row correctness with
    singleTaskMode=false, 5 fragments and 4 exchanges (2 HASH, 1 BROADCAST,
    1 SINGLE). Remote UCX handshakes reported isIntraNodeTransfer=0 and no GPU
    input-boundary exception.
  • clang-format --dry-run --Werror and git diff --check: passed.

Co-authored-by: Ferdinand Xu <ferdinandx@nvidia.com>
@sperlingxx
sperlingxx merged commit 9000232 into dev Aug 13, 2026
4 of 6 checks passed
@sperlingxx
sperlingxx deleted the codex/fix-velox-first-gpu-boundary branch August 13, 2026 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[cuDF] GPU source leaf triggers "GPU input boundary requires a source" during boundary selection

2 participants